using UnityEngine;

public class TrainingTimer : MonoBehaviour
{
	public UILabel title;

	public UILabel timer;

	private void UpdateTimer()
	{
		PlayerTraining playerTraining = GGPlayerSettings.instance.statsManager.playerTraining;
		if (playerTraining.isTrainingFinished())
		{
			UITools.ChangeText(title, "No Active Training");
		}
		else
		{
			UITools.ChangeText(title, "Active Training");
		}
		UITools.ChangeText(timer, GGFormat.FormatTimeSpan(playerTraining.TimeTillTrainingFinished()));
	}

	private void Update()
	{
		UpdateTimer();
	}
}
